/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     ListNode *next;
 *     ListNode() : val(0), next(nullptr) {}
 *     ListNode(int x) : val(x), next(nullptr) {}
 *     ListNode(int x, ListNode *next) : val(x), next(next) {}
 * };
 */

#include <iostream>
#include <vector>

struct ListNode {
    int val;
    ListNode *next;
    ListNode() : val(0), next(nullptr) {}
    ListNode(int x) : val(x), next(nullptr) {}
    ListNode(int x, ListNode *next) : val(x), next(next) {}
};

class Solution {
public:
    void swapNode(ListNode *pre1, ListNode *pre2) {
        ListNode *nxt1 = pre1->next->next;
        ListNode *nxt2 = pre2->next->next;
        ListNode *node1 = pre1->next;
        ListNode *node2 = pre2->next;
        pre1->next->next = nxt2;
        pre2->next->next = nxt1;
        pre1->next = node2;
        pre2->next = node1;
    }
    void reverseNode(ListNode *node) {
        ListNode *nxt = node->next;
        node->next = nxt->next;
        nxt->next = node;
        // return nxt;
    }
    ListNode *reverseList(ListNode *from, ListNode *to) {
        ListNode *it = from;
        for (;it!=to;it=it->next) {
            
        }
    }
    ListNode *reverseKGroup(ListNode *head, int k) {
        ListNode *preHead = new ListNode;
        preHead->val = 0;
        preHead->next = head;

        ListNode *it = preHead, *lst = preHead;
        int cnt = 1;

        while (it != NULL) {
            if (cnt == k - 1)
        }
    }
};